
<template>
    <div class="con">
        <div class="title">
            <img src="../../assets/images/toutu6.png" alt class="toutu">
            <div class="info">
                <div class="content">
                    <p>还款账户</p>

                    <span>
                        <img :src="data.logoUrl" alt>
                        {{data.bankName}} ({{data.cardNo}})
                    </span>
                </div>
                <div class="content">
                    <p>还款日期</p>
                    <span>{{data.repayDays}}</span>
                </div>
                <div class="content">
                    <p>还款金额</p>
                    <span>{{data.repayAmount}}（{{data.repayCount}}笔）</span>
                </div>
                 <div class="content">
                    <p>已还金额</p>
                    <span>{{data.completeAmount}}（{{data.completeCount}}笔）</span>
                </div>
                <div class="content">
                    <p>已扣手续费</p>
                    <span>{{data.completeFee}}</span>
                </div>
                <div class="content">
                    <p>订单号</p>
                    <span>{{data.repayOrderNo}}</span>
                </div>
                <div class="content">
                    <p>订单日期</p>
                    <span>{{data.createTime}}</span>
                </div>
            </div>
        </div>

        <ul>
            <li v-for="(item,index) in data.data" :key="index">
                <img :src="item.icon" alt>

                <span class="time">
                    {{item.repayText}}
                    <br>{{item.tradeTime.slice(5,16)}}  
                    <template v-if="item.tradeStatus==2">
                        <span style="color:#FFAE4E">已执行</span></template>
                    <template v-if="item.tradeStatus==3"> 
                        <span style="color:#FF724F">执行失败</span></template>
                </span>

                <p class="fr tip">
                    <b>{{item.amount}}</b>
                </p>
            </li>

        </ul>
    
    </div>
</template>

<script>
export default {
    name: "backplandetail",
    data() {
        return {
            timestamp: "",
            data: {}
        };
    },
    methods: {
  
    },
    mounted() {
        this.timestamp = Date.parse(new Date());    
            this.axios({
                method: "post",
                url: `${
                    this.siteUrl
                }/app/repay/getOrderDetails?appid=web.2019&format=json&timestamp=${
                    this.timestamp
                }`,
                data: {
                    userId: localStorage.getItem("userId"),
                    repayOrderNo:this.$route.params.repayOrderNo,
               
                }
            })
                .then(response => {
                    console.log(response)
                    
                    if (response.data.success == 1) {
                       this.data=response.data.data;
                      
                    } else {
                        this.$toast(response.data.message);
                       
                    }
                })
                .catch(error => {
                    console.log(error);
                    this.$toast("连接服务器异常");
                });
     
    }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.con {
    width: 100%;
    min-height: 100vh;
    background: #fff;
}
.con .title {
    width: 100%;
    position: relative;
    color: #fff;
}
.con .title .toutu {
    width: 100%;
}
.info {
    width: 90%;
    margin-left: 5%;
    position: absolute;
    top: 0px;
    left: 0px;
}

.content {
    height: 44px;
    position: relative;
}
.content p {
    position: absolute;
    top: 21px;
    color: #fff6eb;
    height: 44px;
}
.content span {
    position: absolute;
    right: 0px;
    top: 21px;
}
.content span img {
    width: 18px;
    margin-right: 5px;
}

.con ul {
    width: 100%;

    margin-top:12px;
    height: 100px;
}
.con li {
    height: 82px;

    position: relative;
    border-bottom: 1px solid #ececec;
    width: 96%;
    margin-left: 2%;
}
.con li:last-child {
    border: none;
}
.con li span {
    color: #a6a9b5;
    font-weight: 200;
}
.con li .time {
    position: absolute;
    top: 24px;
    left: 52px;
}
.con li img {
    width: 22px;
    height: 22px;
    position: absolute;
    left: 14px;
    top: 30px;
}

.con li .tip {
    font-size: 20px;
    margin-top: 28px;
    text-align: right;
    margin-right: 10px;
}


</style>
